home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2000 #5
/
Amiga Plus CD - 2000 - No. 5.iso
/
Tools
/
Misc
/
InstallerNG
/
developer
/
gui
/
example
/
igui_QuietWaitApp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-10-31
|
2KB
|
76 lines
#include "includes.h"
#include "installergui_data.h"
/********************************************************************
*
* DESCRIPTION
*
*/
/********************************************************************
*
* STATIC
*
*/
/********************************************************************
*
* EXTERN
*
*/
/********************************************************************
*
* PUBLIC
*
*/
/********************************************************************
*
* CODE
*
*/
long __asm igui_QuietWaitApp(register __a0 APTR application)
{
#ifdef DEBUG
DEBUG_MAKRO
#endif
{
long sigs = 0, event;
struct Application *app = (struct Application *) application;
// first wake up the application
guistuff_WakeApp(app);
// wait for user input
while (TRUE)
{
DoMethod(app->app_Application, MUIM_Application_NewInput, &sigs);
if (sigs)
{
sigs = Wait(sigs | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D | SIGBREAKF_CTRL_E);
if (sigs & SIGBREAKF_CTRL_D) { event = GUIEVENT_PROCEED; break; } // proceed button
if (sigs & SIGBREAKF_CTRL_C) { event = GUIEVENT_QUIT; break; } // quit
if (sigs & SIGBREAKF_CTRL_E) // cancel button
{
// take care for the BACK button!
if (app->app_BACK_Mode) { event = GUIEVENT_BACK; }
else { event = GUIEVENT_ABORT; }
break;
}
}
}
// lay down to sleep
guistuff_SleepApp(app);
// give back the event
app->app_CurrentGUIEvent = event;
return(event);
}
}